<script type="text/javascript" src="<?php echo js_link("order.js","admin");?>"></script>
<script type="text/javascript" src="<?php echo js_link("calendarDateInput.js","admin");?>"></script>
<?php echo $this->message->display();?>
<h1>Add new order</h1>
 <form action="<?php echo admin_url('customer/my_order_create')?>" method="post" id="edit_cus">
<div class="editcate_ct" id="content">
		<div class="boxadd">
		    <ul class="linect">
		    	<li>
		        	<span class="left"><b>Select tour:</b></span>
		        	<span class="right"><select name="tour_id">
		        	<?php foreach($tour_code as $code){?>
		        	<option value="<?php echo $code["id"];?>"><?php echo $code["code"];?></option>
		        	<?php }?>
		        	</select></span>
		        </li>
		        <li>
		        	<span class="left"><b>Select customer:</b></span>
		        	<span class="right"><select name="customer_id">
		        	<?php foreach($customer as $cus){?>
		        	<option value="<?php echo $cus["id"];?>"><?php echo $cus["title"]." ".$cus["fullname"];?></option>
		        	<?php }?>
		        	</select></span>
		        </li>
		        <li>
		        	<span class="left"><b>Date departure:</b></span>
		        	<span class="right"><script>DateInput('date_departure', true, 'YYYY-MON-DD')</script></span>
		        </li>
		        <li>
		        	<span class="left"><b>End date:</b></span>
		        	<span class="right"><script>DateInput('end_date', true, 'YYYY-MON-DD')</script></span>
		        </li>
		        <li>
		        	<span class="left"><b>Num persons:</b></span>
		        	<span class="right"><input type="text" name="num_persons" value="<?php echo set_value('num_persons');?>" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Adults:</b></span>
		        	<span class="right"><select name="num_adult">
		        	<?php for($i=1; $i<=20; $i++){?>
		        	<option value="<?php echo $i;?>"><?php echo $i;?></option>
		        	<?php }?>
		        	</select>
		        	</span>
		        </li>
		        <li>
		        	<span class="left"><b>Children:</b></span>
		        	<span class="right"><select name="num_chil">
		        	<?php for($i=1; $i<=20; $i++){?>
		        	<option value="<?php echo $i;?>"><?php echo $i;?></option>
		        	<?php }?>
		        	</select>
		        	</span>
		        </li>
		        <li>
		        	<span class="left"><b>Babies:</b></span>
		        	<span class="right"><select name="num_baby">
		        	<?php for($i=1; $i<=20; $i++){?>
		        	<option value="<?php echo $i;?>"><?php echo $i;?></option>
		        	<?php }?>
		        	</select>
		        	</span>
		        </li>
		        <li>
		        	<span class="left"><b>Detail persons:</b></span>
		        	<span class="right"><input type="text" name="detail_persons" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Total price:</b></span>
		        	<span class="right"><input type="text" name="total_price" value="<?php echo set_value('total_price');?>" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Num rooms:</b></span>
		        	<span class="right"><input type="text" name="num_rooms" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Room preferred:</b></span>
		        	<span class="right"><select name="room_preferred">
					<?php foreach($room_preferred as $room){?>
		        	<option value="<?php echo $room;?>"><?php echo $room;?></option>
		        	<?php }?>
					</select></span>
		        </li>
		        <li>
		        	<span class="left"><b>Hotel preferred:</b></span>
		        	<span class="right"><select name="hotel_preferred">
					<?php foreach($hotel_preferred as $hotel){?>
		        	<option value="<?php echo $hotel;?>"><?php echo $hotel;?></option>
		        	<?php }?>
					</select></span>
		        </li>
		        <li>
		        	<span class="left"><b>Request for visa:</b></span>
		        	<span class="right"><input type="checkbox" name="request_for_visa" checked="checked" value="yes" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Request for hotel:</b></span>
		        	<span class="right"><input type="checkbox" name="request_hotel" checked="checked" value="yes" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Flight number:</b></span>
		        	<span class="right"><input type="text" name="flight_number" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Date arrival:</b></span>
		        	<span class="right"><script>DateInput('date_arrival', true, 'YYYY-MON-DD')</script></span>
		        </li>
		        <li>
		        	<span class="left"><b>Time arrival:</b></span>
		        	<span class="right"><script>DateInput('time_arrival', true, 'YYYY-MON-DD')</script></span>
		        </li>
		        <li>
		        	<span class="left"><b>Contact status:</b></span>
		        	<span class="right"><input type="checkbox" name="contact_status" value="done" checked /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Order infomation:</b></span>
		        	<span class="right"><textarea name="order_info" cols="50" rows="10"></textarea></span>
		        </li>
		        <li>
		        	<span class="left"><b>Pro code:</b></span>
		        	<span class="right"><input type="text" name="pro_code" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Total pay:</b></span>
		        	<span class="right"><input type="text" name="total_pay" value="" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Guest name</b>:</span>
		        	<span class="right"><input type="text" name="guest_name" value="" /></span>
		        </li>
		        <li>
		        	<span class="left"><b>Time leave:</b></span>
		        	<span class="right"><script>DateInput('time_leave', true, 'YYYY-MON-DD')</script></span>
		        </li>
		        <li>
		        	<span class="left"><b>Pay status:</b></span>
		        	<span class="right"><select name="pay_stt">
		        	<?php foreach($pay_status as $pay_stt){?>
		        	<option value="<?php echo $pay_stt?>"><?php echo $pay_stt?></option>
		        	<?php }?>
					</select></span>
		        </li>
		        <li>
		        	<span class="left"><b>Time pay:</b></span>
		        	<span class="right"><script>DateInput('time_pay', true, 'YYYY-MON-DD')</script></span>
		        </li>		        
		     </ul>   
		</div>
		
		<div class="btarticle">
	    	<input type="button" name="close" onclick="document.location.href=('<?php echo admin_url('customer/my_order')?>')" value="Cancel" class="btn" style="float:left;" />
	        <input type="submit" name="" value="Save & Exit" class="btn" style="float:left;" />
	    </div>
	</div>
</form>
